#!/usr/bin/env python

import wx
#from wxPython.wx import *
#from wx import *

class MessageBox(wx.Frame):
    
    def __init__(self, parent, id, message):
        
        wx.Frame.__init__(self, parent, id, 'Notice', size=(300, 100), style=wx.DEFAULT_FRAME_STYLE|wx.NO_FULL_REPAINT_ON_RESIZE|wx.STAY_ON_TOP)
        
        panel = wx.Panel(self, -1)
        self.quote = wx.StaticText(panel, -1, message, wx.Point(20, 10))
        button = wx.Button(panel, -1, "OK", pos=(130, 40), size=(40, 20))
        self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
        self.Bind(wx.EVT_BUTTON, self.OnCloseMe, button)
    
    def OnCloseMe(self, event):
        
        self.Close(True)
    
    def OnCloseWindow(self, event):
        
        self.Destroy()
 